wayland: unlink shm file earlier in create function
authorRay Strode <rstrode@redhat.com>
Wed, 20 Jan 2016 17:22:29 +0000 (12:22 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 20 Jan 2016 19:29:15 +0000 (14:29 -0500)
commitc8deaeabddc0cf8aa16bf118f7a9f61a5a4a59aa
tree56c83cf7a14777ef45c2e2fb153433ff01f4a4ea
parent6c1bee2377eba8acc2d6ce03c3bc82fbf157fd37
wayland: unlink shm file earlier in create function

create_shm_pool unlinks the temporary file a little,
too late. It should be unlinked before ftruncate()
is called for two reasons:

1) if ftruncate fails, the file is currently not
getting cleaned up at all
2) in theory, if the file is public some other process
could muck with it

This commit just moves the unlink call a little higher
up.

https://bugzilla.gnome.org/show_bug.cgi?id=760897
gdk/wayland/gdkdisplay-wayland.c